using NHibernate.Mapping.ByCode.Conformist;

namespace Crux.Core.NHibernate.Test;
/// <summary>
/// TestMapping
/// </summary>
public class TestModelMapping : ClassMapping<TestModel>
{
    public TestModelMapping()
    {
        base.Table("test_model");
        base.DynamicUpdate(true);
        base.DynamicInsert(true);
        Lazy(true);
        Id(x => x.Id, map => { map.Column("id"); });

        Property(p => p.Name, map =>
        {
            map.NotNullable(true);
            map.Length(64);
            map.Column("name");
        });
    }
}